Skip to content

ci: build Python bindings so the registered pytest targets can run - #3

Merged
Onlyti merged 2 commits into
mainfrom
ci/python-bindings
Sep 5, 2026
Merged

Onlyti merged 2 commits into
mainfrom
ci/python-bindings

Conversation

@Onlyti

@Onlyti Onlyti commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Q1c-1. CI Configure ran with VDSIM_BUILD_PYTHON=OFF (the default) while cosim/CMakeLists.txt registers ~17 Python tests unconditionally, so the vdsim extension module was never built and every one of them failed with ModuleNotFoundError (11 failed / 391 on all 4 matrix jobs of run 33879377041).

  • Configure: -DVDSIM_BUILD_PYTHON=ON + -Dpybind11_DIR
  • apt python3-dev; pip pybind11==2.13.6 (pinned), numpy, pyyaml
  • new Report toolchain step prints the versions

Local dry run on ailab-12 with the same flags: 391/391 passed, 0 failed.

Generated with Claude Code

Onlyti and others added 2 commits September 4, 2026 23:32
The ctest suite registers ~17 Python tests unconditionally (cosim/CMakeLists.txt
gates them on Python3 being found, not on VDSIM_BUILD_PYTHON), but the CI
Configure step used the default VDSIM_BUILD_PYTHON=OFF. The `vdsim` extension
module was therefore never built and every one of those tests failed with
ModuleNotFoundError -- 11 failed / 391 on all four matrix jobs of run
33879377041, identical across compiler and build type.

- Configure: -DVDSIM_BUILD_PYTHON=ON and -Dpybind11_DIR from the installed
  pybind11, so python/CMakeLists.txt finds the config package without relying
  on Python3_EXECUTABLE (that find_package runs later, in cosim/).
- apt: python3-dev for the extension headers.
- pip: pybind11 pinned to 2.13.6 (it decides how the module is compiled, so an
  unpinned bump is a silent toolchain change), plus numpy and pyyaml which the
  test scripts import.
- New "Report toolchain" step prints the Python/pybind11/numpy/pyyaml versions
  so drift between the CI runner and the measurement host stays visible.

Verified on ailab-12 with the same flags (Unix Makefiles instead of Ninja,
which is not installed there): 391/391 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
test_speed_budget asserted a 1.0 s wall budget for 5 s of simulated time.
That number is the Release contract (real-time factor >= 5x). An unoptimised
Debug build of the same code needs 3-6 s for the identical work, so on the
Debug half of the CI matrix the assert reported the build type, not a
regression (gcc-11 Debug 3.13 s, clang-14 Debug 5.36 s; both Release halves
passed).

The budget now comes from VDSIM_PERF_BUDGET_S and defaults to 1.0, so the
Release contract is unchanged for anyone who sets nothing. The CI Test step
passes 10.0 on Debug rows only. The test is not skipped or excluded on Debug:
it still runs and still fails on a real regression, with roughly 2x headroom
over the worst observed Debug time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Onlyti
Onlyti merged commit 28fd3a6 into main Sep 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant